package com.rran.study.chat.user.client;

import com.rran.study.chat.common.model.Response;
import com.rran.study.chat.user.dto.request.LoginWithPwdDTO;
import com.rran.study.chat.user.dto.request.LoginWithSmsDTO;
import com.rran.study.chat.user.dto.request.QueryUserInfoDTO;
import com.rran.study.chat.user.dto.request.UserInfoDTO;
import com.rran.study.chat.user.dto.response.LoginVO;
import com.rran.study.chat.user.dto.response.UserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "${chat-user.url}", path = " /rran-user")
public interface UserApi {

    @PostMapping("/user/loginWithSms")
    Response<LoginVO> loginWithSms(@RequestBody LoginWithSmsDTO loginWithSmsDTO);

    @PostMapping("/user/loginWithPwd")
    Response<LoginVO> loginWithPwd(@RequestBody LoginWithPwdDTO loginWithPwdDTO);

    @PostMapping("/user/getUserInfo")
    Response<UserInfoVO> getUserInfo(@RequestBody QueryUserInfoDTO queryUserInfoDTO);

    @PostMapping("/user/updateUserInfo")
    Response updateUserInfo(@RequestBody UserInfoDTO userInfoDTO);
}
